package cn.cdu.medical.service.impl;

import cn.cdu.medical.entity.PrescriptionDetail;
import cn.cdu.medical.mapper.PrescriptionDetailMapper;
import cn.cdu.medical.service.IPrescriptionDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 处方明细服务实现类
 */
@Slf4j
@Service
@Transactional
public class PrescriptionDetailServiceImpl extends ServiceImpl<PrescriptionDetailMapper, PrescriptionDetail> 
    implements IPrescriptionDetailService {
    
    @Override
    public List<PrescriptionDetail> getByMedicalRecordId(String medicalRecordId) {
        log.info("查询就诊记录ID为{}的处方明细", medicalRecordId);
        return baseMapper.selectByMedicalRecordId(medicalRecordId);
    }
} 